package top.z.work.module.system.constant;

import top.z.work.framework.common.exception.ErrorCode;
import top.z.work.framework.common.exception.GlobalErrorCode;

/**
 * System错误码枚举类
 */
public interface SystemErrorCode extends GlobalErrorCode {

    //---------------------------------授权模块100000---------------------------------
    ErrorCode AUTH_CAPTCHA_ERROR             = new ErrorCode(100002, "登录失败, 验证码不正确");
    ErrorCode AUTH_ACCOUNT_NOT_EXIST         = new ErrorCode(100003, "登录失败, 账号不存在");
    ErrorCode AUTH_PASSWORD_ERROR            = new ErrorCode(100004, "登录失败, 密码不正确");
    ErrorCode AUTH_ACCOUNT_DISABLE           = new ErrorCode(100005, "登录失败, 账号被禁用");
    ErrorCode AUTH_ACCOUNT_TOKEN_MISS        = new ErrorCode(100006, "访问令牌不存在");
    ErrorCode AUTH_ACCOUNT_TOKEN_EXPIRE      = new ErrorCode(100007, "访问令牌已过期");
    ErrorCode AUTH_REFRESH_TOKEN_MISS        = new ErrorCode(100008, "刷新令牌不存在");
    ErrorCode AUTH_REFRESH_TOKEN_EXPIRE      = new ErrorCode(100009, "刷新令牌已过期");
    ErrorCode AUTH_REFRESH_TOKEN_INVALID     = new ErrorCode(100010, "无效的刷新令牌");
    ErrorCode AUTH_CAPTCHA_KEY_NULL          = new ErrorCode(100011, "验证码Key不能为空");
    ErrorCode AUTH_CAPTCHA_VAL_NULL          = new ErrorCode(100012, "验证码内容不能为空");
    //---------------------------------用户模块200000---------------------------------
    ErrorCode USER_ID_NOT_EMPTY              = new ErrorCode(200001, "用户ID不为空, 操作失败");
    ErrorCode USER_ROLE_NOT_EMPTY            = new ErrorCode(200002, "用户角色不为空, 操作失败");
    //---------------------------------部门模块300000---------------------------------
    ErrorCode DEPT_ASSIGN_TO_USER            = new ErrorCode(300001, "部门被分配给用户, 操作失败");
    ErrorCode DEPT_HAS_CHILDREN              = new ErrorCode(300002, "部门下有子部门, 操作失败");
    ErrorCode DEPT_NAME_DUPLICATE            = new ErrorCode(300003, "已经存在名称为【{}】的角色, 操作失败");
    //---------------------------------角色模块400000---------------------------------
    ErrorCode ROLE_ID_NOT_EMPTY              = new ErrorCode(400001, "角色ID不为空");
    ErrorCode ROLE_RELATE_USER_ID_NOT_EMPTY  = new ErrorCode(400002, "角色关联的用户ID不能为空");
    ErrorCode ROLE_RELATE_ROUTE_ID_NOT_EMPTY = new ErrorCode(400003, "角色关联的路由ID不能为空");
    ErrorCode ROLE_ASSIGN_TO_USER            = new ErrorCode(400004, "角色被分配给用户, 操作失败");
    ErrorCode ROLE_NAME_DUPLICATE            = new ErrorCode(400005, "已经存在名称为【{}】的角色, 操作失败");
    ErrorCode ROLE_CODE_DUPLICATE            = new ErrorCode(400006, "已经存在编码为【{}】的角色, 操作失败");
    //---------------------------------角色模块500000---------------------------------
    ErrorCode CONFIG_NAME_DUPLICATE          = new ErrorCode(500001, "已经存在名为【{}】的配置");
    //---------------------------------菜单模块600000---------------------------------
    ErrorCode MENU_NAME_DUPLICATE            = new ErrorCode(600001, "已经存在【{}】菜单名称, 操作失败");
    ErrorCode MENU_PERMISSION_DUPLICATE      = new ErrorCode(600002, "已经存在【{}】权限标识, 操作失败");
    ErrorCode MENU_ASSIGN_TO_ROLE            = new ErrorCode(600007, "菜单已被分配给角色, 操作失败");
    ErrorCode MENU_PARENT_NOT_EXIST          = new ErrorCode(600002, "父菜单不存在");
    ErrorCode MENU_PARENT_ERROR              = new ErrorCode(600003, "不能设置自己为父菜单");
    ErrorCode MENU_NOT_EXIST                 = new ErrorCode(600004, "菜单不存在");
    ErrorCode MENU_EXIST_CHILDREN            = new ErrorCode(600005, "存在子菜单，无法删除");
    ErrorCode MENU_PARENT_NOT_DIR_OR_MENU    = new ErrorCode(600006, "父菜单的类型必须是目录或者菜单");
    //---------------------------------字典模块700000---------------------------------
    ErrorCode DICT_TYPE_ID_NOT_EMPTY         = new ErrorCode(700001, "字典类型ID不为空");
    ErrorCode DICT_TYPE_NAME_DUPLICATE       = new ErrorCode(700001, "已经存在名称为【{}】的字典类型, 操作失败");
    ErrorCode DICT_TYPE_CODE_DUPLICATE       = new ErrorCode(700001, "已经存在标识为【{}】的字典类型, 操作失败");
    ErrorCode DICT_TYPE_ASSIGN_TO_DATA       = new ErrorCode(700007, "字典类型下拥有字典数据, 操作失败");
    ErrorCode DICT_TYPE_NOT_EXIST            = new ErrorCode(700001, "字典类型不存在, 操作失败");
    ErrorCode DICT_DATA_NAME_DUPLICATE       = new ErrorCode(700001, "已经存在名称为【{}】的字典数据, 操作失败");
    ErrorCode DICT_DATA_CODE_DUPLICATE       = new ErrorCode(700001, "已经存在标识为【{}】的字典数据, 操作失败");

}
